import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);
let store = new Vuex.Store({
    state:{
        username:""
    },
    mutations:{
        getusername: (state,username)=>{
            state.username = username;
            localStorage.setItem("username",username)
        }
    },
    actions:{},
    getters:{
        username:(state)=>{
            localStorage.getItem("username")
        }
    }
})
export default store;
